﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="QLNguoiDung.aspx.cs" Inherits="Admin_NguoiDung_QLNguoiDung" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HomePlaceHolder" runat="Server">
    <div class="hrm_header_placeholder">
        Quản lý người dùng</div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="padding: 10px">
                <asp:HiddenField ID="H_CatalogId" Value="0" runat="server" />
                <asp:Panel ID="PanelAdd" Width="100%" GroupingText="Cập nhật thông tin" runat="server">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td colspan="4" height="10">
                            </td>
                        </tr>
                        <tr>
                            <td width="20">
                            </td>
                            <td width="110" class="hrm_title_blue">
                            </td>
                            <td width="7" class="hrm_title_blue">
                            </td>
                            <td>
                                <asp:Label ID="lblStatus" ForeColor="Red" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" height="4">
                            </td>
                        </tr>
                        <tr>
                            <td width="20">
                            </td>
                            <td width="110" class="hrm_title_blue">
                                Họ và tên
                            </td>
                            <td width="7" class="hrm_title_blue">
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtHoTen" CssClass="hrm_textbox" Width="400px" MaxLength="100" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" SetFocusOnError="True"
                                    ControlToValidate="txtHoTen" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" height="4">
                            </td>
                        </tr>
                        <tr>
                            <td width="20">
                            </td>
                            <td width="110" class="hrm_title_blue">
                                Tên truy cập
                            </td>
                            <td width="7" class="hrm_title_blue">
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtTenTruyCap" CssClass="hrm_textbox" Width="400px" MaxLength="100"
                                    runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" SetFocusOnError="True"
                                    ControlToValidate="txtTenTruyCap" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" height="4">
                            </td>
                        </tr>
                        <tr>
                            <td width="20">
                            </td>
                            <td width="110" class="hrm_title_blue">
                                Mật khẩu
                            </td>
                            <td width="7" class="hrm_title_blue">
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtMatKhau" CssClass="hrm_textbox" Width="400px" TextMode="Password"
                                    MaxLength="100" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" SetFocusOnError="True"
                                    ControlToValidate="txtMatKhau" Display="Dynamic" ErrorMessage=" (*)"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" height="4">
                            </td>
                        </tr>
                        <tr>
                            <td width="20">
                            </td>
                            <td width="110" class="hrm_title_blue">
                            </td>
                            <td width="7" class="hrm_title_blue">
                            </td>
                            <td>
                                <asp:ImageButton ID="cmdSave" ImageUrl="~/Images/save.jpg" runat="server" OnClick="cmdSave_Click" />
                                <asp:ImageButton ID="cmdReset" CausesValidation="false" ImageUrl="~/Images/huy.jpg"
                                    runat="server" OnClick="cmdReset_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" height="8">
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <asp:Panel ID="PanelList" Width="100%" Height="355" GroupingText="Danh sách" runat="server">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="20">
                            </td>
                            <td style="padding-right: 15px">
                                <asp:Panel ID="PanelGrid" Width="100%" runat="server">
                                    <br />
                                    <asp:GridView ID="gridCatalog" runat="server" DataKeyNames="Id" Width="100%" BackColor="White"
                                        OnRowCommand="gridCatalog_RowCommand" OnRowDataBound="gridCatalog_RowDataBound"
                                        EmptyDataText="<br><center>Không tồn tại dữ liệu</center><br>" BorderColor="#CCCCCC"
                                        AutoGenerateColumns="false" BorderStyle="Solid" BorderWidth="1px" CellPadding="3">
                                        <Columns>
                                            <asp:BoundField DataField="id" Visible="false" HeaderText="id"></asp:BoundField>
                                            <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7%">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="cmdSelect" runat="server" CssClass="command_button" CausesValidation="false"
                                                        Text="Select" CommandName="Select" CommandArgument='<%# Eval("id") %>'>Select</asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7%">
                                                <ItemTemplate>
                                                    <asp:LinkButton ID="cmdDelete" runat="server" CssClass="command_button" CausesValidation="false"
                                                        Text="Delete" CommandName="Delete" CommandArgument='<%# Eval("id") %>'>Delete</asp:LinkButton>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="TenTruyCap" ItemStyle-Width="20%" HeaderText="Tên truy cập">
                                            </asp:BoundField>
                                            <asp:BoundField DataField="HoTen" HeaderText="Họ tên"></asp:BoundField>
                                            <asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Ngày tạo" ItemStyle-Width="150">
                                                <ItemTemplate>
                                                    <asp:Label ID="Label1" runat="server" Text='<%# Convert.ToDateTime(Eval("NgayCapNhat")).ToString("dd/MM/yyyy")%>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <RowStyle ForeColor="#000066" />
                                        <SelectedRowStyle BackColor="#dedfdf" Font-Bold="True" ForeColor="Gray" />
                                        <HeaderStyle BackColor="#006699" Font-Bold="True" HorizontalAlign="Left" ForeColor="White" />
                                    </asp:GridView>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" height="10">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
